<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;

class FollowRequest extends FormRequest
{
    public function rules(): array
    {
        return [
            'type' => ['required', 'in' => Rule::in(['book', 'word'])],
            'id' => 'required',
        ];
    }

    public function attributes(): array
    {
        return [
            'type' => '类型',
            'id' => '对象',
        ];
    }
}
